<template>
	<div class="comment">
		<p>评论</p>
		<div class="comts" v-for="(item,index) in commentsco">
			<div class="person">
				<div class="headimg">
					<img :src="item.user.avatarUrl" alt="" />
				</div>
				<span>{{item.user.nickname}}</span>
			</div>
			<p>{{item.content}}</p>
		</div>
	</div>
</template>

<script>
	import axios from "axios"
	export default {
		name:"comment",
		data(){
			return {
				baseurl:"http://netease.bluej.cn",
				commentsco:[]
			}
		},
		created(){
			this.getcomment(10780251);
		},
		methods:{
			getcomment(ids){
				var that = this;
				axios.get(this.baseurl+"/comment/mv?id="+ids)
				.then(function(res){
					console.log(res.data.comments);
					that.commentsco=res.data.comments;
					console.log(that.commentsco);
				});
			}
		}
	}
</script>

<style scoped="" lang="scss">
	.comment{
		width: 100%;
		.comts{
			
			
			.person{
				display: flex;
				justify-content: flex-start;
				margin: 10px;
				.headimg{
					width: 28px;
					height: 28px;
					border-radius: 50%;
					overflow: hidden;
					img{
						width: 100%;
					}
				}
				span{
					font-size: 12px;
					margin-left: 12px;
				}
			}
			p{
				font-size: 13px;
				text-align: left;
			    padding-left: 50px;
   				 padding-right: 5px;
   				 border-bottom: 1px solid gainsboro;
   				 padding-bottom: 10px;
   				 color: #000;
			}
		}
	}
</style>